package com.applet.system.config;


import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
import org.springframework.session.web.http.CookieSerializer;
import org.springframework.session.web.http.DefaultCookieSerializer;


@Configuration
@EnableRedisHttpSession(maxInactiveIntervalInSeconds=1800,redisNamespace="console")
public class RedisSessionConfig {

	@Bean
    public CookieSerializer cookieSerializer() {
        DefaultCookieSerializer defaultCookieSerializer = new DefaultCookieSerializer();
        defaultCookieSerializer.setCookieName("applet-console-session");
//        defaultCookieSerializer.setDomainName("xxx.com");
        defaultCookieSerializer.setCookiePath("/");
        return defaultCookieSerializer;
    }
}
